package cn.com.joyplus.wechat.listener;

import cn.com.joyplus.wechat.exceptions.WechatEventListenerException;
import cn.com.joyplus.wechat.model.WechatEvent;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;

/**
 * Created by 王灏川(wangrs@qq.com) on 2017/8/11 0011.
 *
 * 处理用户发给公众号的图片消息
 *   <xml><ToUserName><![CDATA[gh_baaf1686e313]]></ToUserName>
 *   <FromUserName><![CDATA[obWde08iJXKTezCCnERt39XphoAI]]></FromUserName>
 *   <CreateTime>1501867063</CreateTime>
 *   <MsgType><![CDATA[image]]></MsgType>
 *   <PicUrl><![CDATA[http://mmbiz.qpic.cn/mmbiz_jpg/YYJ43OR7l1Mbfkd7m4icXTU0sHXUgR7uK75pMQu7QTubV2RXC7Y96rYSb5PDRss0red5L237G8o2G36icdOsAu2A/0]]></PicUrl>
 *   <MsgId>6450469918961935632</MsgId>
 *   <MediaId><![CDATA[5WHiTqB9cS4N0MJnRgc0AjMf5cguL8b9EvxMgJVZEV9fQteRI2lDGhT3pOWAH75t]]></MediaId>
 *  </xml>
 */
@Component
public class ImageMessageListener implements IMsgListener {
    private static final Logger logger = LoggerFactory.getLogger(ImageMessageListener.class);


    @Override
    public String process(WechatEvent event)  throws WechatEventListenerException {
        logger.info(event.toString());
        return null;
    }
}